<!DOCTYPE html>
<html>
<head>
    <title>售后登记表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("service:serviceregister:save")>
            <a class="btn btn-primary btn-sm" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("service:serviceregister:update")>
            <a class="btn btn-primary btn-sm" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("service:serviceregister:delete")>
            <a class="btn btn-primary btn-sm" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

<div v-show="!showList" class="panel panel-default">

    <div class="panel-heading">操作</div>
    <div style="padding: 10px 10px 10px 20px; text-align: center;">
        <button type="button" @click="check(2)" class="btn  btn-primary btn-sm" style="width: 100px;"><i class="fa fa-check"></i>&nbsp;审核</button>
        <button type="button" @click="check(9)" class="btn  btn-danger btn-sm" style="margin-left: 30px; width: 100px;"><i class="fa fa-times"></i>&nbsp;驳回</button>
        <button type="button" @click="reload" class="btn  btn-default btn-sm" style="margin-left: 30px; width: 100px;"><i class="fa fa-arrow-left"></i>&nbsp;返回</button>
    </div>

    <!--<span style="margin: 15px;  font-size: 20px;   ">订单信息</span>-->
    <div class="panel-heading">{{serviceOrderInfo.orderCreatetime}} 订单编号 {{serviceOrderInfo.orderNo}}</div>
    <el-row :gutter="20" style="padding-left: 30px; margin: 15px">
         <!--第一列-->
        <el-col :span="6">
            <div class="el-form">
                <div >
                    <label class="el-form-item__label" style="width: 80px;">订单类型:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.thirdMerchantTypeText}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">供应商:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.suppName}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">会员名:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.memberName}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">交货时间:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.receivedTime}}</span>
                    </div>
                </div>
            </div>

        </el-col>
        <!-- 第二列-->
        <el-col :span="6">
            <div class="el-form">
                <div >
                    <label class="el-form-item__label" style="width: 80px;">收货人:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.shipName}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">联系方式:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.shipMobile}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">配送地区:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.shipAddr}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">备注:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.memo}}</span>
                    </div>
                </div>
            </div>

        </el-col>

        </el-col>
        <!--第三列-->
        <el-col :span="6">
            <div class="el-form">
                <div >
                    <label class="el-form-item__label" style="width: 80px;">配送方式:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.sendType}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">配送报价:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.costFreight}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">商品重量:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.weight}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">支付方式:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.payment}}</span>
                    </div>
                </div>
            </div>

        </el-col>
        <!--第四列-->
        <el-col :span="6">
            <div >
                <label class="el-form-item__label" style="width: 80px;">获得积分</label>
                <div class="el-form-item__content" style="margin-left: 80px;">
                    <span></span>
                </div>
            </div>
            <div >
                <label class="el-form-item__label" style="width: 80px;">顾客备注:</label>
                <div class="el-form-item__content" style="margin-left: 80px;">
                    <span>{{serviceOrderInfo.memo}}</span>
                </div>
            </div>
        </el-col>
    </el-row>

    <!--<span style="margin: 15px;  font-size: 20px;   ">费用明细</span>-->
    <el-table
            :data="costItemData"
            size="small"
            border
            style="width: 100%;"
            :header-cell-style="{'background-color': '#f5f5f5'}"
            >
        <el-table-column  prop="totalAmount" label="商品总额" ></el-table-column>
        <el-table-column  prop="costFreight" label="配送费用"></el-table-column>
        <el-table-column  prop="discount" label="调价" ></el-table-column>
        <el-table-column  prop="pmtGoods" label="商品促销优惠" ></el-table-column>
        <el-table-column  prop="pmtOrder" label="优惠券" ></el-table-column>
        <el-table-column  prop="pmtRandom" label="随机立减" ></el-table-column>
        <el-table-column  prop="payableAmount" label="应付金额" ></el-table-column>
        <el-table-column  prop="payed" label="已付金额" ></el-table-column>
    </el-table>

    <div class="panel-heading" style="margin-top: 15px">售后登记</div>
    <el-row :gutter="20" style="padding-left: 30px; margin: 15px">
        <!--第一列-->
        <el-col :span="8">
            <div class="el-form">
                <div >
                    <label class="el-form-item__label" style="width: 80px;">售后类型:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceRegister.srType}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">售后原因:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceRegister.srReason}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">配送单号:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceRegister.srOrderSend}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">备注:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceRegister.srRemark}}</span>
                    </div>
                </div>
            </div>

        </el-col>
        <!-- 第二列-->
        <el-col :span="8">
            <div class="el-form">
                <div >
                    <label class="el-form-item__label" style="width: 80px;">退款金额:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceRegister.srRefundAmount}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">退款路径:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceRegister.srRefundPath}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">运费承担:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceRegister.srFreightForm}}</span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">运费金额:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceRegister.srFreightAmount}}</span>
                    </div>
                </div>
            </div>

        </el-col>
        <!--第三列-->
        <el-col :span="8">
            <div class="el-form">
                <div >
                    <label class="el-form-item__label" style="width: 80px;">能否二次销售:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span></span>
                    </div>
                </div>
                <div >
                    <label class="el-form-item__label" style="width: 80px;">退货仓库:</label>
                    <div class="el-form-item__content" style="margin-left: 80px;">
                        <span>{{serviceOrderInfo.srReturnStockId}}</span>
                    </div>
                </div>
            </div>

        </el-col>

    </el-row>

    <div class="panel-heading">售后责任</div>
    <el-button type="info" style="margin: 5px" size="mini" @click="openDialogResponsibility">添加<i class="el-icon-plus el-icon--right"></i></el-button>
    <el-table
            :data="selectedResponsibilityData"
            size="small"
            border
            style="width: 100%;"
            :header-cell-style="{'background-color': '#f5f5f5'}"
    >
        <el-table-column  prop="responsibleParty" label="责任方" ></el-table-column>
        <el-table-column  prop="specificUnit" label="具体单位"></el-table-column>
        <el-table-column  prop="reason" label="原因" ></el-table-column>
        <el-table-column  prop="buckleMoney" label="惩罚措施" ></el-table-column>
    </el-table>


</div>

    <!--售后责任弹窗-->
    <el-dialog title="售后责任" :visible.sync="dialogResponsibilityVisible">
        <el-table
                ref="responsibilityTable"
                :data="responsibilityData"
                tooltip-effect="dark"
                border
                style="width: 100%"
                >
            <el-table-column
                    type="selection"
                    width="55">
            </el-table-column>

            <el-table-column prop="responsibleParty" label="责任方"  width="120"> </el-table-column>

            <el-table-column  label="具体单位" width="150">
                <template slot-scope="scope" v-if="scope.row.responsibleParty !='客户自己' && scope.row.responsibleParty !='其他'">
                    <el-input v-model="scope.row.specificUnit" placeholder="请填写具体单位"></el-input>
                </template>
            </el-table-column>

            <el-table-column   label="原因" show-overflow-tooltip>
                <template slot-scope="scope" >
                    <el-input v-model="scope.row.reason" placeholder="请填写原因"></el-input>
                </template>
            </el-table-column>

            <el-table-column label="惩罚措施" show-overflow-tooltip>
                <template slot-scope="scope" v-if="scope.row.responsibleParty !='客户自己' && scope.row.responsibleParty !='其他'">
                    <el-input v-model="scope.row.buckleMoney" placeholder="请输入金额"></el-input>
                </template>
            </el-table-column>
        </el-table>

        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="dialogResponsibilityVisible = false">取 消</el-button>
            <el-button size="small" type="primary" @click="addResponsibility">确 定</el-button>
        </div>
    </el-dialog>
</div>

<script src="${request.contextPath}/statics/js/modules/service/serviceregister.js?_${.now?long}"></script>
</body>
</html>